package com.sisqorap;

import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;

public class Preferences {
	private static final String MYPREFS = "puzzelAlarmPrefs";
	private int preferencesMode = Activity.MODE_PRIVATE;
	
	private SharedPreferences mySharedPreferences;
	
	public Preferences(Context packageContext){
		mySharedPreferences = packageContext.getSharedPreferences(MYPREFS, preferencesMode);
	}
	
	public int getIntValue(String key, int defaultValue){
		return mySharedPreferences.getInt(key, defaultValue);
	}
	
	public void setIntValue(String key, int value){
		SharedPreferences.Editor editor = mySharedPreferences.edit();
		editor.putInt(key, value);
		editor.commit();
	}
}
